/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package milkyway.hightech.conditions;

/**
 *
 * @author michael
 */
public class InvestmentAccountConditions extends Conditions
{
    private ConditionTypes conditionType;
    
    public InvestmentAccountConditions(double creditInterest, ConditionTypes conditionType)
    {
	super(creditInterest);
	this.conditionType = conditionType;
    }
    
    @Override
    public double getCreditInterest()
    {
	return creditInterest;
    }
    
    public int getContractPeriod()
    {
	return conditionType.getValue();
    }
    
    @Override
    public String toString()
    {
	String data = "";
	
	data += "Contract period: " + conditionType + " Month - " + creditInterest + " % interest\n";
	
	return data;
    }
}
